package com.my.design.structural.proxy.staticProxy.proxObj;

import com.my.design.structural.proxy.staticProxy.*;

/**
 * @author 代廷波
 * @className: AggregationProxy
 * @description: 聚合代理模式
 * @create 2018/12/21 0021-10:41
 **/
public class AggregationProxy implements ICar {
    private ICar car;

    public AggregationProxy(ICar car) {
        this.car = car;
    }

    @Override
    public void move(String carName,int max) {
        System.out.println("开始记录访问时间"+System.currentTimeMillis());
        car.move(carName,max);
        System.out.println("开始记录访问时间"+System.currentTimeMillis());
    }
}
